package com.naruto.thinkmgr.mapper;

import com.naruto.thinkmgr.bean.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Collection;

@Repository
public interface UserMapper {

    public User getUserByName(String username);

    User getUserById(int userId);

    void updatePassword(User dbUser);

    Collection<Role> getAllRolesByUserId(int userId);

    Collection<Permission> getAllPermissionsByUserId(int userId);

    Page<User> queryUserByPage(@Param("pageParm") PageParm pageParm, @Param("user") User user);
}
